import {
  BingMapsImageryProvider,BingMapsStyle
} from '@cesium/Source/Cesium.js';

const url = '//dev.virtualearth.net'

const tk = "An0DpYhyIBPAnxtz3QcBUpO556da9j2-zuK450ByQToaftxC9G4-RszT-lR1TZaJ";

// http://cesium.xin/cesium/cn/Documentation1.62/BingMapsStyle.html
const bingMaps = {
  bingMapsAeria() {
    return {
      name: "bingMapsAeria",
      title: "bing影像",
      create: () => new BingMapsImageryProvider({
        url,
        // key: 'get-yours-at-https://www.bingmapsportal.com/',
        key: tk,
        mapStyle: BingMapsStyle.AERIAL
      })
    }
  },
  bingMapsAeriaAnno() {
    return {
      name: "bingMapsAeriaAnno",
      title: "bing带注记影像",
      create: () => new BingMapsImageryProvider({
        url,
        key: tk,
        mapStyle: BingMapsStyle.AERIAL_WITH_LABELS_ON_DEMAND //与道路覆盖物的航拍图像。
      })
    }
  },
  bingMapsAeriaDark() {
    return {
      name: "bingMapsAeriaDark",
      title: "bing深色影像",
      create: () => new BingMapsImageryProvider({
        url,
        key: tk,
        mapStyle: BingMapsStyle.CANVAS_DARK  //路线图的深色版本。
      })
    }
  },
  bingMapsAeriaGray() {
    return {
      name: "bingMapsAeriaGray",
      title: "bing灰度影像",
      create: () => new BingMapsImageryProvider({
        url,
        key: tk,
        mapStyle: BingMapsStyle.CANVAS_GRAY   //路线图的灰度版本
      })
    }
  },
  bingMapsRoad() {
    return {
      name: "bingMapsRoad",
      title: "bing道路",
      create: () => new BingMapsImageryProvider({
        url,
        key: tk,
        mapStyle: BingMapsStyle.ROAD_ON_DEMAND   //没有其他图像的道路。
      })
    }
  },
};

bingMaps.bingMapsImagery = bingMaps.bingMapsAeria;

export default bingMaps;
